﻿using MediatR;
using RBAC.MaHaiBo.API.Application.Command.RoleCommand;
using RBAC.MaHaiBo.Entity;
using RBAC.MaHaiBo.Service;
using System.Data;

namespace RBAC.MaHaiBo.API.Application.CommandHandlers.RoleHandler
{
    public class RoleRoleBackfillCommandHandlers : IRequestHandler<RoleBackfillCommand, RoleInfo>
    {
        IRoleService rSer;

        public RoleRoleBackfillCommandHandlers(IRoleService rSer)
        {
            this.rSer = rSer;
        }
        public async Task<RoleInfo> Handle(RoleBackfillCommand request, CancellationToken cancellationToken)
        {
            return  await rSer.GetRoleInfo(request.Rid);
        }
    }
}
